'''
@project:Tinyshop_t174
@auther:lihanliang
@file:tyspqd_dz.py
@date:2022/11/8 16:33
@dasc:
'''
import time
import unittest
from common.broswersetting import broswersetting


class TinyshopDZ(broswersetting):

    def test_DZ_01(self):
        self.zzdl('502822488@qq.com','cn19961011')
        self.tinyshop_dz('430105','泊富大厦1023','小白','15845212358','13578541285')
        try:
            self.assertNotIn('提交',self.driver.page_source)
        except Exception as e:
            self.driver.get_screenshot_as_file('./images/test_DZ_01.png')
            raise
        time.sleep(2)

    def test_DZ_02(self):
        self.zzdl('502822488@qq.com','cn19961011')
        self.tinyshop_dz('430105','泊富大厦1023','小白','','13578541285')
        try:
            self.assertNotIn('格式错误',self.driver.page_source)
        except Exception as e:
            self.driver.get_screenshot_as_file('./images/test_DZ_02.png')
            raise e
        time.sleep(2)

    def test_DZ_03(self):
        self.zzdl('502822488@qq.com','cn19961011')
        self.tinyshop_dz('430105','泊富大厦1023','小白','15845212358','')
        try:
            self.assertNotIn('提交',self.driver.page_source)
        except Exception as e:
            self.driver.get_screenshot_as_file('./images/test_DZ_03.png')
            raise
        time.sleep(2)


if __name__=='__main__':
    unittest.main()


